<%@ page language="java" import="java.util.*" pageEncoding="UTF-8" contentType="text/html; charset=utf-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<html>
<jsp:include page="../head.jsp"></jsp:include>
<body>
<jsp:include page="Left.jsp"></jsp:include>
<form id='fmTbModule'  action='TbModuleServlet?method=${sessionScope.tbModule==null?'add':'edit'}' method='post'>
<input type='hidden' name='moduleId' id='moduleId' value='${sessionScope.tbModule.moduleId }' />
<input type='hidden' name='moduleSeq' id='moduleSeq' value='${sessionScope.tbModule.moduleSequence }' />
<table>
<tr><td colspan='2'></td></tr>
<tr>
    <td>模块名称</td>
    <td><input type='text' name='moduleName' id='moduleName' value='${sessionScope.tbModule.moduleName }' /></td>
</tr>
<tr>
    <td>模块序列</td>
    <td><input type='text' name='moduleSequence' id='moduleSequence' value='${sessionScope.tbModule.moduleSequence }' onkeyup="value=value.replace(/[^\d]/g,'') "onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"  /></td>
</tr>
<tr>
    <td>模块URL</td>
    <td><input name='moduleUrl' type='text' id='moduleUrl' value='${sessionScope.tbModule.moduleUrl }' width="" /></td>
</tr>
<tr>
    <td>所属模块</td>
    <td>
      <div>
        <select name='parentModuleId' size="" id='parentModuleId' >
          <option value="0" selected >顶级</option>
          <c:forEach items="${sessionScope.tbModuleList}" var="tbModule" varStatus="status">
            <option value="${tbModule.moduleId }" ${sessionScope.tbModule.parentModuleId == tbModule.moduleId?'selected':''}>${tbModule.moduleName}</option>
          </c:forEach>
        </select>
      </div>    </td>
</tr>
<tr>
    <td>是否有效</td>
    <td>
    <input type="radio" name="isEnable" value="0" checked />有效
    <input type="radio" name="isEnable" value="1"  />无效
    </tr>
<tr>
    <td>模块备注</td>
    <td><input type='text' name='moduleMemo' id='moduleMemo' value='${sessionScope.tbModule.moduleMemo }' /></td>
</tr>
<tr>
    <td  align="center" colspan='2' ><input type="submit" name="btsubmit" id="btsubmit" value="${sessionScope.tbModule==null?'添加':'修改'}" /><input type='reset' value='重置' /><input type='button' value='返回' onclick='history.go(-1);' /></td>
</tr></table>
</form><jsp:include page="../foot.jsp"></jsp:include>
</body></html>